package com.lwp.ctable.service;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.lwp.ctable.mapper.ImageMapper;
import com.lwp.ctable.model.Image;
import com.lwp.ctable.service.serviceImp.ImageService;

import java.util.List;

@Service
public class ImageServiceImpl implements ImageService{

    @Resource
    private ImageMapper imageMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return imageMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Image record) {
        return imageMapper.insert(record);
    }

    @Override
    public int insertSelective(Image record) {
        return imageMapper.insertSelective(record);
    }

    @Override
    public Image selectByPrimaryKey(Long id) {
        return imageMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Image> selectByUserId(Long userId, Long start, Long sum) {
        return imageMapper.selectByUserId(userId,start,sum);
    }

    @Override
    public List<Image> selectByUserId(Long userId) {
        return imageMapper.selectByUserId(userId,0L,20L);
    }

    @Override
    public int updateByPrimaryKeySelective(Image record) {
        return imageMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Image record) {
        return imageMapper.updateByPrimaryKey(record);
    }

}
